﻿using System;
using System.Xml;
using System.Drawing;

namespace SS.Ynote.Classic
{
    /// <summary>
    /// Ynote Theme File Reader
    /// </summary>
    static class YnoteThemeReader
    {
        /// <summary>
        /// Applys a Ynote Theme Interface
        /// </summary>
        /// <param name="file"></param>
        static public void Apply(FastColoredTextBoxNS.FastColoredTextBox tb, IYnoteTheme theme, SyntaxHighlighter s)
        {
            tb.BackColor = theme.BackColor;
            tb.IndentBackColor = theme.LineNumberPaddingColor;
            tb.ServiceLinesColor = theme.ServiceLineColor;
            tb.ForeColor = theme.ForeColor;
            tb.CurrentLineColor = theme.CurrentLineColor;
            tb.SelectionColor = theme.SelectionColor;
            tb.CaretColor = theme.CaretColor;
            tb.BracketsStyle = new FastColoredTextBoxNS.MarkerStyle(theme.BracketBrush1);
            tb.BracketsStyle2 = new FastColoredTextBoxNS.MarkerStyle(theme.BracketBrush2);
            tb.BookmarkColor = theme.BookmarkColor;
            tb.FoldingIndicatorColor = theme.FoldingColor;
            tb.LineNumberColor = theme.LineNumberColor;
            s.CommentStyle = theme.CommentStyle;
            s.CommentTagStyle = theme.CommentTagStyle;
            s.ClassNameStyle = theme.ClassNameStyle;
            s.AttributeStyle = theme.AttributeStyle;
            s.AttributeValueStyle = theme.AttributeValueStyle;
            s.FunctionsStyle = theme.FunctionsStyle;
            s.HtmlEntityStyle = theme.HtmlEntityStyle;
            s.NumberStyle = theme.NumberStyle;           
            s.StatementsStyle = theme.StatementsStyle;   
            s.StringStyle = theme.StringStyle;
            s.CSSPropertyStyle = theme.CSSPropertyStyle;
            s.CSSSelectorStyle = theme.CSSSelectorStyle;
            s.KeywordStyle = theme.KeywordStyle;         
            s.KeywordStyle2 = theme.KeywordStyle2;       
            s.KeywordStyle3 = theme.KeywordStyle3;
            s.VariableStyle = theme.VariableStyle;
            s.TypesStyle = theme.TypesStyle;             
            s.TagBracketStyle = theme.TagBracketStyle;   
            s.TagNameStyle = theme.TagNameStyle;
            s.CharStyle = theme.CharStyle;
            s.ClassNameStyle2 = theme.ClassNameStyle2;
        }
      
    }
}
